<template>
	<view class=" u-flex u-flex-between u-flex-items-center" :class="{
		'_app_item': line
	}">
		<view class="u-flex u-flex-items-center">
			<image :src="info.logo" mode="widthFix" style="width: 100rpx;height: auto;"></image>
			<view class="u-m-l-24">
				<view class="f-s-16">
					{{ info.name }}
				</view>
				<view class="f-s-12 u-m-t-16 u-info">
					{{ info.text }}
				</view>
			</view>
		</view>
		<view>
			<up-button text="进入" :customStyle="{
				width: '120rpx',
				height: '56rpx',
				background: '#1677FF',
				borderRadius: '8rpx',
				fontSize: '28rpx',
				color: '#FFFFFF'
			}" @click="toPage"></up-button>
		</view>

	</view>
</template>

<script setup>
	import {
		toast
	} from '../utils/common';
	const props = defineProps({
		info: Object,
		line: {
			type: Boolean,
			default: true
		}
	})

	const toPage = () => {
		const page = props.info.page
		if (!page) {
			toast("正在完善中...")
			return
		}
		uni.navigateTo({
			url: page
		})

	}
</script>

<style lang="scss" scoped>
	._app_item {
		border-bottom: 1rpx solid rgba(0, 0, 0, 0.06);
		margin-bottom: 36rpx;
		padding-bottom: 36rpx;
	}
</style>